CREATE TABLE [dbo].[TOUR_KS]
(
[MA_TOUR] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MA_KS] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TOUR_KS] ADD CONSTRAINT [PK_TOURKS] PRIMARY KEY CLUSTERED  ([MA_TOUR], [MA_KS]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_TOURKS_MAKS] ON [dbo].[TOUR_KS] ([MA_KS]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TOUR_KS] ADD CONSTRAINT [FK_TOURKS_KS] FOREIGN KEY ([MA_KS]) REFERENCES [dbo].[KHACH_SAN] ([MA_KS])
GO
ALTER TABLE [dbo].[TOUR_KS] ADD CONSTRAINT [FK_TOURKS_TOUR_CBVC] FOREIGN KEY ([MA_TOUR]) REFERENCES [dbo].[TOUR] ([MA_TOUR])
GO
